import { fetch, fetchToken, fetchNoMsg, fetchForImg } from '@/utils/fetch'
/* ============通知管理列表-当前用户所订阅============*/
export function myNoticeList(data) {
  return fetchNoMsg({
    url: '/notification/list_my_all',
    method: 'get',
    params: data
  })
}
/* ============根据通知code获得当前用户的所有消息============*/
export function myMessageListByCode(notificationCode) {
  return fetchNoMsg({
    url: '/message/list_my_message_by_notification_code',
    method: 'get',
    params: { notification_code: notificationCode}
  })
}
/* ============将消息表示为已读===========*/
export function markRead(id) {
  const data = {
    id
  }
  return fetchNoMsg({
    url: '/message/mark_read',
    method: 'post',
    params: data
  })
}
/* ============获取当前用户所有未读消息数============*/
export function myUnreadMessage(data) {
  return fetchNoMsg({
    url: '/message/count_my_unread_message',
    method: 'get',
    params: data
  })
}